package cn.changeforyou.web.blog.luceneAop;

import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.List;
import org.nutz.aop.MethodInterceptor;
import org.nutz.ioc.Ioc;
import org.nutz.ioc.aop.SimpleAopMaker;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;

/**
 * @author zhyu
 */
@IocBean(name = "$aop_lucene")
public class LuceneAopLoader extends SimpleAopMaker<Lucene> {

    @Inject
    LuceneMethodInterceptor luceneMethodInterceptor;
    @Override
    public List<? extends MethodInterceptor> makeIt(Lucene lucene, Method method, Ioc ioc) {
//        LuceneMethodInterceptor luceneMethodInterceptor = new LuceneMethodInterceptor();
        return Arrays.asList(luceneMethodInterceptor);
    }
}
